//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include <cstdlib>

#include <iostream>
#include <fstream>

#include "PDBToFASTA.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
using namespace std;
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
int main(int argc, char** argv) {

  String* folderIn;
  String* filenameOut;
  String* listFile;

  if (argc < 4) {
    cout << "Error in the input arguments. The execution must be: " << endl;
    cout << "./GetFastaFileFromPDB <folder with the pdb files> <file with list of files> <output fasta file with the PDB sequences>" << endl;
    return 0;
  }
  else {
    cout << "---------------------------------------------------------------------------------" << endl;
    cout << "    Input  Folder : " << argv[1] << endl;
    cout << "     List File In : " << argv[2] << endl;
    cout << "Output Fasta File : " << argv[3] << endl;
    cout << "---------------------------------------------------------------------------------" << endl;
    folderIn    = new String(argv[1]);
    listFile    = new String(argv[2]);
    filenameOut = new String(argv[3]);
  }

  PDBToFASTA* pdbToFASTA = new PDBToFASTA();

  pdbToFASTA->Location(folderIn);
  pdbToFASTA->FilenameOut(filenameOut);
  pdbToFASTA->ListInFilename(listFile);
  //pdbToFASTA->ConstructFileUsingList();
  pdbToFASTA->ConstructFileWithoutDUsingList();

  cout << "---------------------------------------------------------------------------------" << endl;

  if (pdbToFASTA) delete pdbToFASTA;

  return 1;

}
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//


